\hypertarget{_digital___output_8h}{\section{Digital\-\_\-\-Output.\-h File Reference}
\label{_digital___output_8h}\index{Digital\-\_\-\-Output.\-h@{Digital\-\_\-\-Output.\-h}}
}


Header file for the \hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} data structure.  


{\ttfamily \#include \char`\"{}Tekdaqc\-\_\-\-Debug.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Tekdaqc\-\_\-\-Config.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}T\-L\-E7232\-\_\-\-Relay\-Driver.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Tekdaqc\-\_\-\-Error.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}Tekdaqc\-\_\-\-B\-S\-P.\-h\char`\"{}}\\*
{\ttfamily \#include \char`\"{}boolean.\-h\char`\"{}}\\*
\subsection*{Data Structures}
\begin{DoxyCompactItemize}
\item 
struct \hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t}
\begin{DoxyCompactList}\small\item\em Data structure used to store the state and requirements of a digital output of the Tekdaqc. This data structure contains all the information related to a particular input to the Tekdaqc. Please note that while there is nothing to stop you from manipulating the values of the structure directly, it is not recommended as it could put the structure in an indeterminate state. Instead, manipulation functions are provided which will ensure that all state related implications are addressed. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Macros}
\begin{DoxyCompactItemize}
\item 
\hypertarget{group__digital__output_ga95c04964ce488ee74ca3f32a39a88cb7}{\#define \hyperlink{group__digital__output_ga95c04964ce488ee74ca3f32a39a88cb7}{M\-A\-X\-\_\-\-D\-I\-G\-I\-T\-A\-L\-\_\-\-O\-U\-T\-P\-U\-T\-\_\-\-N\-A\-M\-E\-\_\-\-L\-E\-N\-G\-T\-H}~24}\label{group__digital__output_ga95c04964ce488ee74ca3f32a39a88cb7}

\begin{DoxyCompactList}\small\item\em The maximum number of characters for the name of an digital output. \end{DoxyCompactList}\item 
\hypertarget{group__digital__output_ga43583966bde63db2887f604cf5787741}{\#define \hyperlink{group__digital__output_ga43583966bde63db2887f604cf5787741}{O\-U\-T\-P\-U\-T\-\_\-\-O\-N}~(\hyperlink{group__board__channel__constants_ggaee574a0d48c41a3e5426ffbf8ac4c5c4ab4d04526d504d52286c0125def0faef4}{L\-O\-G\-I\-C\-\_\-\-L\-O\-W})}\label{group__digital__output_ga43583966bde63db2887f604cf5787741}

\begin{DoxyCompactList}\small\item\em Redefinition of the L\-O\-G\-I\-C\-\_\-\-L\-O\-W definition. Used as a code readability convenience. \end{DoxyCompactList}\item 
\hypertarget{group__digital__output_ga514fc5ac6ead9d3aee8ae8fc8188a1d3}{\#define \hyperlink{group__digital__output_ga514fc5ac6ead9d3aee8ae8fc8188a1d3}{O\-U\-T\-P\-U\-T\-\_\-\-O\-F\-F}~(\hyperlink{group__board__channel__constants_ggaee574a0d48c41a3e5426ffbf8ac4c5c4ad49fd7cec8a5997c9347759048470fc9}{L\-O\-G\-I\-C\-\_\-\-H\-I\-G\-H})}\label{group__digital__output_ga514fc5ac6ead9d3aee8ae8fc8188a1d3}

\begin{DoxyCompactList}\small\item\em Redefinition of the L\-O\-G\-I\-C\-\_\-\-H\-I\-G\-H definition. Used as a code readability convenience. \end{DoxyCompactList}\end{DoxyCompactItemize}
\subsection*{Functions}
\begin{DoxyCompactItemize}
\item 
void \hyperlink{group__digital__output_gaf266fa3481b0804611eb19719346b172}{Digital\-Outputs\-Init} (void)
\begin{DoxyCompactList}\small\item\em Initializes the boards digital output data structures. \end{DoxyCompactList}\item 
\hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} $\ast$ \hyperlink{group__digital__output_ga392c891d1dfd4610ea0e1ef67f76872b}{Get\-Digital\-Output\-By\-Number} (uint8\-\_\-t number)
\begin{DoxyCompactList}\small\item\em Retrieves the requested digital output. \end{DoxyCompactList}\item 
\hyperlink{group__tekdaqc__error_ga19df05d919ecca7a7501b35ae9080a32}{Tekdaqc\-\_\-\-Function\-\_\-\-Error\-\_\-t} \hyperlink{group__digital__output_gaeac54f24092eff564148db6cd346f153}{Add\-Digital\-Output} (\hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} $\ast$output)
\begin{DoxyCompactList}\small\item\em Adds a digital output, marking it for inclusion in the state machine. \end{DoxyCompactList}\item 
\hyperlink{group__tekdaqc__error_ga19df05d919ecca7a7501b35ae9080a32}{Tekdaqc\-\_\-\-Function\-\_\-\-Error\-\_\-t} \hyperlink{group__digital__output_ga3ae9f85352ddfe3c29046f9d3b068d64}{Remove\-Digital\-Output} (char keys\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, char values\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, int count)
\begin{DoxyCompactList}\small\item\em Removes a digital output, marking it for exclusion from the state machine. \end{DoxyCompactList}\item 
\hyperlink{group__tekdaqc__error_ga19df05d919ecca7a7501b35ae9080a32}{Tekdaqc\-\_\-\-Function\-\_\-\-Error\-\_\-t} \hyperlink{group__digital__output_ga3310818e215cffd25126906b9215e46b}{List\-Digital\-Outputs} (void)
\begin{DoxyCompactList}\small\item\em Prints a representation of all the added digital outputs. \end{DoxyCompactList}\item 
\hyperlink{group__tekdaqc__error_ga19df05d919ecca7a7501b35ae9080a32}{Tekdaqc\-\_\-\-Function\-\_\-\-Error\-\_\-t} \hyperlink{group__digital__output_gad98544b3d86d168290b487808e58142f}{Create\-Digital\-Output} (char keys\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, char values\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, int count)
\begin{DoxyCompactList}\small\item\em Configures a digital output with the specified parameters. \end{DoxyCompactList}\item 
\hypertarget{group__digital__output_ga7f6d7f4a8ed42dfa380728cad94dbc28}{\hyperlink{group__tekdaqc__error_ga19df05d919ecca7a7501b35ae9080a32}{Tekdaqc\-\_\-\-Function\-\_\-\-Error\-\_\-t} \hyperlink{group__digital__output_ga7f6d7f4a8ed42dfa380728cad94dbc28}{Set\-Digital\-Output} (char keys\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, char values\mbox{[}$\,$\mbox{]}\mbox{[}\hyperlink{group__command__parser_ga6147771b5547853f33eb838895e3d5a2}{M\-A\-X\-\_\-\-C\-O\-M\-M\-A\-N\-D\-P\-A\-R\-T\-\_\-\-L\-E\-N\-G\-T\-H}\mbox{]}, uint8\-\_\-t count)}\label{group__digital__output_ga7f6d7f4a8ed42dfa380728cad94dbc28}

\begin{DoxyCompactList}\small\item\em Sets a digital output to the specified state. \end{DoxyCompactList}\item 
void \hyperlink{group__digital__output_ga3853c412989dc241c2c9157e5102673b}{Set\-Digital\-Output\-Write\-Function} (\hyperlink{group__tekdaqc__configuration_ga163b2a4cc55a569e988df48908631967}{Write\-Function} write\-Function)
\begin{DoxyCompactList}\small\item\em Sets the pointer to the function to invoke when digital output data needs to be written. \end{DoxyCompactList}\item 
void \hyperlink{group__digital__output_ga51fe681dd6e8e9f84a03b8c71af0b71d}{Sample\-Digital\-Output} (\hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} $\ast$output)
\begin{DoxyCompactList}\small\item\em Samples the specified digital output's level and writes out the result. \end{DoxyCompactList}\item 
void \hyperlink{group__digital__output_gacc8cec336fbe7c0aae9dcca1914f7882}{Sample\-All\-Digital\-Outputs} (void)
\begin{DoxyCompactList}\small\item\em Samples the digital output level of all added digital outputs, writing out the results. \end{DoxyCompactList}\item 
void \hyperlink{group__digital__output_gaa10fe33be14ef4d8e16e6345f57938c5}{Write\-Digital\-Output} (\hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} $\ast$output)
\begin{DoxyCompactList}\small\item\em Writes out the data for the specified digital output. \end{DoxyCompactList}\item 
void \hyperlink{group__digital__output_ga1198a3ce0740a6ba43f5325d3ba9f950}{Write\-All\-Digital\-Outputs} (void)
\begin{DoxyCompactList}\small\item\em Writes out the data for all added digital outputs. \end{DoxyCompactList}\item 
\hyperlink{group__data__types_ga0ecf26b576b9a54eca656b9be7ba6a06}{bool} \hyperlink{group__digital__output_ga5178a212748e618e157767d96991b0b8}{Check\-Digital\-Output\-Status} (void)
\begin{DoxyCompactList}\small\item\em Checks the stored status register contents for any errors. \end{DoxyCompactList}\item 
\hyperlink{group__data__types_ga0ecf26b576b9a54eca656b9be7ba6a06}{bool} \hyperlink{group__digital__output_gae27ad2dffb82e46632339521c3cfd6ee}{Set\-Digital\-Output\-Fault\-Status} (\hyperlink{group__tle7232__driver_ga84bb3f68b575c6add1c27f053b87746a}{T\-L\-E7232\-\_\-\-Status\-\_\-t} status, uint8\-\_\-t chip\-\_\-id, uint8\-\_\-t channel)
\begin{DoxyCompactList}\small\item\em Sets the fault status register on the specified output driver. \end{DoxyCompactList}\end{DoxyCompactItemize}


\subsection{Detailed Description}
Contains public definitions and data types for the \hyperlink{struct_digital___output__t}{Digital\-\_\-\-Output\-\_\-t} data structure.

\begin{DoxyAuthor}{Author}
Jared Woolston (\href{mailto:jwoolston@tenkiv.com}{\tt jwoolston@tenkiv.\-com}) 
\end{DoxyAuthor}
\begin{DoxySince}{Since}
v1.\-0.\-0.\-0 
\end{DoxySince}


Definition in file \hyperlink{_digital___output_8h_source}{Digital\-\_\-\-Output.\-h}.

